﻿<navigation:Page 
    x:Class="PermDoc.PageFavorites" 
    mc:Ignorable="d" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
    xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk" 
    xmlns:inputToolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Input.Toolkit"
    xmlns:inputToolkitPrimitives="clr-namespace:System.Windows.Controls.Primitives;assembly=System.Windows.Controls.Input.Toolkit"
    d:DesignWidth="1024"
    d:DesignHeight="800"
    VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch"
    Title="Favorites Page" 
    Loaded="Page_Loaded" Unloaded="Page_Unloaded" 
    MouseMove="Page_MouseMove" KeyUp="Page_KeyUp" MouseLeftButtonUp="Page_MouseLeftButtonUp" MouseRightButtonUp="Page_MouseRightButtonUp" MouseWheel="Page_MouseWheel">

    <UserControl.Resources>
        <Style x:Key="RatingItemMovieStyle" TargetType="inputToolkit:RatingItem">
            <Setter Property="BorderBrush" Value="#FF545454"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="inputToolkit:RatingItem">
                        <Grid Height="20" Width="20" Background="{TemplateBinding Background}">
                            <VisualStateManager.VisualStateGroups>
                                <VisualStateGroup x:Name="CommonStates">
                                    <VisualStateGroup.Transitions>
                                        <VisualTransition GeneratedDuration="00:00:00.1000000"/>
                                        <VisualTransition From="MouseOver" GeneratedDuration="00:00:00" To="Normal"/>
                                    </VisualStateGroup.Transitions>
                                    <VisualState x:Name="Normal"/>
                                    <VisualState x:Name="MouseOver">
                                        <Storyboard>
                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="MouseOverRatingItem" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
                                            </DoubleAnimationUsingKeyFrames>
                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="MouseOverHighlight" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.36"/>
                                            </DoubleAnimationUsingKeyFrames>
                                            <ColorAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="MouseOverHighlight" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)">
                                                <SplineColorKeyFrame KeyTime="00:00:00" Value="#FFFFFFFF"/>
                                            </ColorAnimationUsingKeyFrames>
                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="MouseOverRatingItem" Storyboard.TargetProperty="(UIElement.Effect).(DropShadowEffect.BlurRadius)">
                                                <EasingDoubleKeyFrame KeyTime="00:00:00" Value="4"/>
                                            </DoubleAnimationUsingKeyFrames>
                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="MouseOverRatingItem" Storyboard.TargetProperty="(UIElement.Effect).(DropShadowEffect.ShadowDepth)">
                                                <EasingDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
                                            </DoubleAnimationUsingKeyFrames>
                                            <ColorAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="MouseOverRatingItem" Storyboard.TargetProperty="(UIElement.Effect).(DropShadowEffect.Color)">
                                                <EasingColorKeyFrame KeyTime="00:00:00" Value="#FF3A3A3A"/>
                                            </ColorAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="Pressed">
                                        <Storyboard/>
                                    </VisualState>
                                    <VisualState x:Name="Disabled"/>
                                    <VisualState x:Name="ReadOnly"/>
                                </VisualStateGroup>
                                <VisualStateGroup x:Name="FocusStates">
                                    <VisualState x:Name="Focused">
                                        <Storyboard/>
                                    </VisualState>
                                    <VisualState x:Name="Unfocused"/>
                                </VisualStateGroup>
                                <VisualStateGroup x:Name="FillStates">
                                    <VisualState x:Name="Empty"/>
                                    <VisualState x:Name="Partial"/>
                                    <VisualState x:Name="Filled"/>
                                </VisualStateGroup>
                            </VisualStateManager.VisualStateGroups>
                            <Border Background="#02FFFFFF" BorderThickness="0"/>
                            <Path x:Name="DefaultRatingItem" Fill="White" Stretch="Fill" StrokeLineJoin="Round" StrokeThickness="0.6" VerticalAlignment="Stretch" Opacity="1" UseLayoutRounding="False" Data="M15,0 L18.6,11.373603 L30,11.459046 L20.824955,18.573566 L24.270519,30 L15,23.023449 L5.7294912,30 L9.1750822,18.573566 L0,11.459046 L11.399999,11.373603 z" Stroke="#FF969696">
                                <Path.Effect>
                                    <DropShadowEffect Color="#FFC4C4C4" ShadowDepth="1"/>
                                </Path.Effect>
                            </Path>
                            <inputToolkitPrimitives:LinearClipper RatioVisible="{TemplateBinding DisplayValue}" ExpandDirection="Right">
                                <Path Fill="{TemplateBinding Foreground}" Stretch="Fill" Stroke="{x:Null}" StrokeLineJoin="Round" VerticalAlignment="Stretch" Opacity="1" UseLayoutRounding="False" Data="M15,0 L18.6,11.373603 L30,11.459046 L20.824955,18.573566 L24.270519,30 L15,23.023449 L5.7294912,30 L9.1750822,18.573566 L0,11.459046 L11.399999,11.373603 z"/>
                            </inputToolkitPrimitives:LinearClipper>
                            <Path x:Name="MouseOverRatingItem" Stretch="Fill" Stroke="{x:Null}" StrokeLineJoin="Round" VerticalAlignment="Stretch" UseLayoutRounding="False" Data="M15,0 L18.6,11.373603 L30,11.459046 L20.824955,18.573566 L24.270519,30 L15,23.023449 L5.7294912,30 L9.1750822,18.573566 L0,11.459046 L11.399999,11.373603 z" Fill="#FFFFCB00" Opacity="0">
                                <Path.Effect>
                                    <DropShadowEffect/>
                                </Path.Effect>
                            </Path>
                            <Path x:Name="MouseOverHighlight" Fill="#FFFFFFFF" Stretch="Fill" Stroke="{x:Null}" StrokeLineJoin="Round" VerticalAlignment="Stretch" Opacity="0" UseLayoutRounding="False" Data="M15,0 L18.6,11.373603 L30,11.459046 L20.824955,18.573566 L24.270519,30 L15,23.023449 L5.7294912,30 L9.1750822,18.573566 L0,11.459046 L11.399999,11.373603 z"/>
                            <Path x:Name="FocusRatingItem" Stretch="Fill" Stroke="#FF6DBDD1" StrokeLineJoin="Round" StrokeThickness="0.01" VerticalAlignment="Stretch" Opacity="0" UseLayoutRounding="False" Data="M15,0 L18.6,11.373603 L30,11.459046 L20.824955,18.573566 L24.270519,30 L15,23.023449 L5.7294912,30 L9.1750822,18.573566 L0,11.459046 L11.399999,11.373603 z"/>
                            <ContentPresenter x:Name="Content" Cursor="{TemplateBinding Cursor}" HorizontalAlignment="Left" Margin="{TemplateBinding Padding}" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}"/>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </UserControl.Resources>

    <Grid 
        x:Name="LayoutRoot"
        Width="1024" Height="795"
        MinWidth="800" MinHeight="450"
        MaxWidth="2024" MaxHeight="550"
        VerticalAlignment="Top" HorizontalAlignment="Left"
        >

        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="99*" />
            <ColumnDefinition Width="1*" />
        </Grid.ColumnDefinitions>

        <Grid.RowDefinitions>
            <RowDefinition Height="500" MinHeight="450" MaxHeight="600" />
            <RowDefinition MinHeight="30" />
        </Grid.RowDefinitions>

        <sdk:DataGrid 
                x:Name="gv"
                Grid.Column="0" Grid.Row="0"
                IsReadOnly="True"
                SelectionMode="Single"
                AutoGenerateColumns="False"
                CanUserResizeColumns="False"
                Visibility="Collapsed"
                Width="Auto" Height="470"
                MinWidth="800" MinHeight="400"
                MaxWidth="2024" MaxHeight="768"
                VerticalAlignment="Top" HorizontalAlignment="Left"
                VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" 
                MouseLeftButtonUp="gv_MouseLeftButtonUp" MouseRightButtonUp="gv_MouseRightButtonUp" MouseWheel="gv_MouseWheel" MouseMove="gv_MouseMove">

            <sdk:DataGrid.Columns>

                <sdk:DataGridTemplateColumn
                    Header="ИД" Width="50" Visibility="Collapsed">
                    <sdk:DataGridTemplateColumn.CellTemplate>
                        <DataTemplate >
                            <sdk:Label Content="{Binding ИД}"/>
                        </DataTemplate>
                    </sdk:DataGridTemplateColumn.CellTemplate>
                </sdk:DataGridTemplateColumn>

                <sdk:DataGridTemplateColumn
                    Header="" Width="80" Visibility="Visible">
                    <sdk:DataGridTemplateColumn.CellTemplate>
                        <DataTemplate >
                            <Button 
                                Name="oBtnInRow" 
                                ToolTipService.ToolTip="{Binding Tooltip}"
                                HorizontalAlignment="Left">
                                <StackPanel 
                                    Orientation="Horizontal" HorizontalAlignment="Left">
                                    <Image 
                                        Height="15"
                                        Width="40"
                                        HorizontalAlignment="Left"
                                        Source="{Binding ImgUrl}" />
                                    <Image 
                                        Height="15"
                                        Source="{Binding ImgUrlFavorites}" />
                                </StackPanel>
                            </Button>
                        </DataTemplate>
                    </sdk:DataGridTemplateColumn.CellTemplate>
                </sdk:DataGridTemplateColumn>

                <sdk:DataGridTemplateColumn
                    Header="No" Width="200" Visibility="Visible">
                    <sdk:DataGridTemplateColumn.CellTemplate>
                        <DataTemplate >
                            <sdk:Label 
                                Foreground="Brown"
                                Content="{Binding No}"/>
                        </DataTemplate>
                    </sdk:DataGridTemplateColumn.CellTemplate>
                </sdk:DataGridTemplateColumn>

                <sdk:DataGridTemplateColumn
                    Header="Статус" Width="80" Visibility="Visible">
                    <sdk:DataGridTemplateColumn.CellTemplate>
                        <DataTemplate >
                            <sdk:Label 
                                Content="{Binding Статус}"
                                Foreground="{Binding StatusColor}"
                                />
                        </DataTemplate>
                    </sdk:DataGridTemplateColumn.CellTemplate>
                </sdk:DataGridTemplateColumn>

                <sdk:DataGridTemplateColumn
                    Header="N_Док" Width="120" Visibility="Visible">
                    <sdk:DataGridTemplateColumn.CellTemplate>
                        <DataTemplate >
                            <sdk:Label 
                                Foreground="Brown"
                                Content="{Binding N_Док}"/>
                        </DataTemplate>
                    </sdk:DataGridTemplateColumn.CellTemplate>
                </sdk:DataGridTemplateColumn>

                <sdk:DataGridTemplateColumn
                    Header="Дата_Док" Width="60" Visibility="Visible">
                    <sdk:DataGridTemplateColumn.CellTemplate>
                        <DataTemplate >
                            <sdk:Label 
                                Foreground="DarkOliveGreen"
                                Content="{Binding Path=Дата_Док, Mode=OneWay, StringFormat='dd.MM.yy'}"/>
                        </DataTemplate>
                    </sdk:DataGridTemplateColumn.CellTemplate>
                </sdk:DataGridTemplateColumn>

                <sdk:DataGridTemplateColumn
                    Header="Магазин" Width="120" Visibility="Visible">
                    <sdk:DataGridTemplateColumn.CellTemplate>
                        <DataTemplate >
                            <sdk:Label
                                FontSize="10"
                                Foreground="DarkGray"
                                Content="{Binding Магазин}"/>
                        </DataTemplate>
                    </sdk:DataGridTemplateColumn.CellTemplate>
                </sdk:DataGridTemplateColumn>

                <sdk:DataGridTemplateColumn
                    Header="Контрагент" Width="120" Visibility="Visible">
                    <sdk:DataGridTemplateColumn.CellTemplate>
                        <DataTemplate >
                            <sdk:Label 
                                FontSize="10"
                                Foreground="DarkGray"
                                Content="{Binding Контрагент}"/>
                        </DataTemplate>
                    </sdk:DataGridTemplateColumn.CellTemplate>
                </sdk:DataGridTemplateColumn>

                <sdk:DataGridTemplateColumn
                    Header="Автор" Width="120" Visibility="Visible">
                    <sdk:DataGridTemplateColumn.CellTemplate>
                        <DataTemplate >
                            <sdk:Label 
                                FontSize="10"
                                Foreground="DarkGoldenrod"
                                Content="{Binding Автор}"/>
                        </DataTemplate>
                    </sdk:DataGridTemplateColumn.CellTemplate>
                </sdk:DataGridTemplateColumn>

                <sdk:DataGridTemplateColumn
                    Header="Создан" Width="120" Visibility="Visible">
                    <sdk:DataGridTemplateColumn.CellTemplate>
                        <DataTemplate >
                            <sdk:Label 
                                Foreground="DarkOliveGreen"
                                Content="{Binding Path=Создан, Mode=OneWay, StringFormat='dd.MM.yyyy hh:mm:ss'}"/>
                        </DataTemplate>
                    </sdk:DataGridTemplateColumn.CellTemplate>
                </sdk:DataGridTemplateColumn>

                <sdk:DataGridTemplateColumn
                    Header="Редактор" Width="120" Visibility="Visible">
                    <sdk:DataGridTemplateColumn.CellTemplate>
                        <DataTemplate >
                            <sdk:Label 
                                FontSize="10"
                                Foreground="DarkGoldenrod"
                                Content="{Binding Редактор}"/>
                        </DataTemplate>
                    </sdk:DataGridTemplateColumn.CellTemplate>
                </sdk:DataGridTemplateColumn>

                <sdk:DataGridTemplateColumn
                    Header="Изменён" Width="120" Visibility="Visible">
                    <sdk:DataGridTemplateColumn.CellTemplate>
                        <DataTemplate >
                            <sdk:Label 
                                Foreground="DarkOliveGreen"
                                Content="{Binding Path=Изменён, Mode=OneWay, StringFormat='dd.MM.yyyy hh:mm:ss'}"/>
                        </DataTemplate>
                    </sdk:DataGridTemplateColumn.CellTemplate>
                </sdk:DataGridTemplateColumn>

            </sdk:DataGrid.Columns>

            <sdk:DataGrid.RowGroupHeaderStyles>
                <!-- Style for groups at top level -->
                <Style TargetType="sdk:DataGridRowGroupHeader">
                    <Setter Property="PropertyNameVisibility" Value="Collapsed" />
                    <Setter Property="Background" Value="#FF112255" />
                    <Setter Property="Foreground" Value="#FFEEEEEE" />
                    <Setter Property="SublevelIndent" Value="15" />
                </Style>
                <!-- Style for groups under the top level -->
                <Style TargetType="sdk:DataGridRowGroupHeader">
                    <Setter Property="Background" Value="#44225566" />
                </Style>
            </sdk:DataGrid.RowGroupHeaderStyles>

            <sdk:DataGrid.RowDetailsTemplate>
                <!-- Begin row details section. -->
                <DataTemplate>
                    <Border BorderBrush="Black" BorderThickness="1" Background="Azure">
                        <StackPanel Orientation="Horizontal">
                            <StackPanel>
                                <StackPanel Orientation="Vertical">

                                    <Grid Name="gvDetals">

                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition MinWidth="250" MaxWidth="300" Width="250" />
                                            <ColumnDefinition MinWidth="250" MaxWidth="300" Width="250" />
                                            <ColumnDefinition MinWidth="250" MaxWidth="300" Width="250" />
                                            <ColumnDefinition MinWidth="250" MaxWidth="300" Width="250" />
                                            <ColumnDefinition MinWidth="250" MaxWidth="300" Width="250" />
                                        </Grid.ColumnDefinitions>

                                        <Grid.RowDefinitions>
                                            <RowDefinition Height="30" />
                                            <RowDefinition Height="30" />
                                            <RowDefinition Height="30" />
                                            <RowDefinition Height="30" />
                                            <RowDefinition Height="30" />
                                            <RowDefinition Height="30" />
                                            <RowDefinition Height="30" />
                                        </Grid.RowDefinitions>

                                        <TextBlock 
                                            Grid.Column="0" Grid.Row="0"
                                            FontSize="16" Foreground="MidnightBlue" 
                                            Text="Номер : "
                                            VerticalAlignment="Center" HorizontalAlignment="Right" />
                                        <TextBox 
                                            Grid.Column="1" Grid.Row="0" 
                                            FontSize="12" Foreground="MidnightBlue" FontWeight="Bold"
                                            Text="{Binding No}" 
                                            Width="240"
                                            IsReadOnly="True"
                                            Margin="0,0,10,0" 
                                            VerticalAlignment="Center" HorizontalAlignment="Left"/>

                                        <TextBlock 
                                            Grid.Column="2" Grid.Row="0"
                                            FontSize="12"
                                            Text="Дата документа : "
                                            VerticalAlignment="Center" HorizontalAlignment="Right" />
                                        <TextBox 
                                            Grid.Column="3" Grid.Row="0"
                                            FontSize="12"
                                            Text="{Binding Path=Дата_Док, Mode=OneWay, StringFormat='dd.MM.yyyy hh:mm:ss'}" 
                                            Width="240"
                                            IsReadOnly="True"
                                            VerticalAlignment="Center" HorizontalAlignment="Left"
                                            />

                                        <TextBlock 
                                            Grid.Column="2" Grid.Row="1"
                                            FontSize="12"
                                            Text="Создан на портале : "
                                            VerticalAlignment="Center" HorizontalAlignment="Right" />
                                        <TextBox 
                                            Grid.Column="3" Grid.Row="1"
                                            FontSize="12"
                                            Text="{Binding Path=Создан, Mode=OneWay, StringFormat='dd.MM.yyyy hh:mm:ss'}" 
                                            Width="240"
                                            IsReadOnly="True"
                                            VerticalAlignment="Center" HorizontalAlignment="Left"
                                            />

                                        <TextBlock 
                                            Grid.Column="2" Grid.Row="2"
                                            FontSize="12"
                                            Text="Автор : "
                                            VerticalAlignment="Center" HorizontalAlignment="Right" />
                                        <TextBox 
                                            Grid.Column="3" Grid.Row="2"
                                            FontSize="12"
                                            Text="{Binding Path=Автор}" 
                                            Width="240"
                                            IsReadOnly="True"
                                            VerticalAlignment="Center" HorizontalAlignment="Left"
                                            />

                                        <TextBlock 
                                            Grid.Column="2" Grid.Row="3"
                                            FontSize="12"
                                            Text="Изменен : "
                                            VerticalAlignment="Center" HorizontalAlignment="Right" />
                                        <TextBox 
                                            Grid.Column="3" Grid.Row="3"
                                            FontSize="12"
                                            Text="{Binding Path=Изменён, Mode=OneWay, StringFormat='dd.MM.yyyy hh:mm:ss'}" 
                                            Width="240"
                                            IsReadOnly="True"
                                            VerticalAlignment="Center" HorizontalAlignment="Left"
                                            />

                                        <TextBlock 
                                            Grid.Column="2" Grid.Row="4"
                                            FontSize="12"
                                            Text="Редактор : "
                                            VerticalAlignment="Center" HorizontalAlignment="Right" />
                                        <TextBox 
                                            Grid.Column="3" Grid.Row="4"
                                            FontSize="12"
                                            Text="{Binding Path=Редактор}" 
                                            Width="240"
                                            IsReadOnly="True"
                                            VerticalAlignment="Center" HorizontalAlignment="Left"
                                            />

                                        <TextBlock 
                                            Grid.Column="0" Grid.Row="1"
                                            FontSize="12"
                                            Text="Статус : "
                                            VerticalAlignment="Center" HorizontalAlignment="Right" />
                                        <TextBox 
                                            Grid.Column="1" Grid.Row="1"
                                            FontSize="12"
                                            Text="{Binding Path=Статус}" 
                                            Foreground="{Binding StatusColor}"
                                            Width="240"
                                            IsReadOnly="True"
                                            VerticalAlignment="Center" HorizontalAlignment="Left"
                                            />

                                        <TextBlock 
                                            Grid.Column="0" Grid.Row="2"
                                            FontSize="12"
                                            Text="Магазин : "
                                            VerticalAlignment="Center" HorizontalAlignment="Right" />
                                        <TextBox 
                                            Grid.Column="1" Grid.Row="2"
                                            FontSize="12"
                                            Text="{Binding Path=Магазин}" 
                                            Width="240"
                                            IsReadOnly="True"
                                            VerticalAlignment="Center" HorizontalAlignment="Left"
                                            />

                                        <TextBlock 
                                            Grid.Column="0" Grid.Row="3"
                                            FontSize="12"
                                            Text="Контрагент : "
                                            VerticalAlignment="Center" HorizontalAlignment="Right" />
                                        <TextBox 
                                            Grid.Column="1" Grid.Row="3"
                                            FontSize="12"
                                            Text="{Binding Path=Контрагент}" 
                                            Width="240"
                                            IsReadOnly="True"
                                            VerticalAlignment="Center" HorizontalAlignment="Left"
                                            />

                                        <TextBlock 
                                            Grid.Column="0" Grid.Row="4"
                                            FontSize="12"
                                            Text="Накладная : "
                                            VerticalAlignment="Center" HorizontalAlignment="Right" />
                                        <TextBox 
                                            Grid.Column="1" Grid.Row="4"
                                            FontSize="12"
                                            Text="{Binding Path=N_Док}" 
                                            Width="240"
                                            IsReadOnly="True"
                                            VerticalAlignment="Center" HorizontalAlignment="Left"
                                            />

                                        <StackPanel 
                                                Grid.Column="0" Grid.Row="6" 
                                                Orientation="Horizontal" >

                                            <CheckBox 
                                                Name="oFavoritesCheck"                                                 
                                                IsChecked="{Binding Path=IsFavorites}" 
                                                Checked="oFavoritesCheck_Checked" 
                                                Unchecked="oFavoritesCheck_Unchecked" />

                                            <inputToolkit:Rating 
                                                    x:Name="oFavorites"
                                                    IsEnabled="True"
                                                    Value="{Binding Path=FavoritesValue}" 
                                                    ItemCount="10" 
                                                    ItemContainerStyle="{StaticResource RatingItemMovieStyle}" 
                                                    HorizontalAlignment="Center" 
                                                    BorderBrush="Black" 
                                                    ValueChanged="OnoFavoritesValueChanged"
                                            >
                                            
                                                <inputToolkit:Rating.Foreground>
                                                    <RadialGradientBrush Center="0.449000000953674,0.128000006079674" GradientOrigin="0.646000027656555,-1.17299997806549" RadiusX="-0.74299997091293335" RadiusY="0.37799999117851257">
                                                        <GradientStop Color="#FFF70202" Offset="0.989"/>
                                                        <GradientStop Color="#FFF62C2C" Offset="0.817"/>
                                                        <GradientStop Color="#FFF60202" Offset="0.005"/>
                                                        <GradientStop Color="#FFFFA043" Offset="0.934"/>
                                                    </RadialGradientBrush>
                                                </inputToolkit:Rating.Foreground>
                                                
                                            </inputToolkit:Rating>

                                        </StackPanel>

                                        <StackPanel 
                                                Grid.Column="1" Grid.Row="6" 
                                                Orientation="Horizontal" 
                                                HorizontalAlignment="Center"
                                                VerticalAlignment="Center"
                                            >

                                            <Button Click="Button_Click">
                                                Предварительный просмотр документов
                                            </Button>

                                        </StackPanel>

                                        <StackPanel 
                                                Grid.Column="2" Grid.Row="6"
                                                Grid.ColumnSpan="2"
                                                Orientation="Horizontal" 
                                                HorizontalAlignment="Center"
                                                VerticalAlignment="Center" >

                                            <HyperlinkButton 
                                                Content="{Binding Path=No, StringFormat=Открыть_в_браузере: \{0\}}"
                                                NavigateUri="{Binding Path=No, StringFormat=http://sp.korablik.local/shops/DocLib/\{0\}}" 
                                                TargetName="_blank" />

                                            <HyperlinkButton 
                                                Content="{Binding Path=ИД, StringFormat=Свойства}"
                                                NavigateUri="{Binding Path=ИД, StringFormat=http://sp.korablik.local/shops/DocLib/Forms/DispForm.aspx\?ID\=\{0\}}" 
                                                TargetName="_blank" />
                                            
                                        </StackPanel>

                                    </Grid>

                                </StackPanel>
                            </StackPanel>
                        </StackPanel>
                    </Border>
                </DataTemplate>
                <!-- End row details section. -->
            </sdk:DataGrid.RowDetailsTemplate>

        </sdk:DataGrid>

        <Grid 
            x:Name="LayoutBottom"
            Grid.Column="0" Grid.Row="1"
            Width="1024" 
            MinWidth="800" MinHeight="80"
            MaxWidth="2024" MaxHeight="150"
            Margin="0,-30"
            VerticalAlignment="Bottom" HorizontalAlignment="Left"
            >

            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="20*" MinWidth="330" />
                <ColumnDefinition Width="20*" MinWidth="140" />
                <ColumnDefinition Width="30*" />
                <ColumnDefinition Width="30*" />
            </Grid.ColumnDefinitions>

            <Grid.RowDefinitions>
                <RowDefinition Height="1" MinHeight="0" MaxHeight="5" />
                <RowDefinition Height="50" MinHeight="30" MaxHeight="60" />
                <RowDefinition Height="35" MinHeight="30" MaxHeight="40" />
                <RowDefinition Height="15" MinHeight="30" MaxHeight="40" />

            </Grid.RowDefinitions>

            <StackPanel 
                Grid.Column="0" Grid.Row="0" 
                Orientation="Horizontal" 
                VerticalAlignment="Center" HorizontalAlignment="Left" >

            </StackPanel>

            <StackPanel 
                Grid.Column="0" Grid.Row="1" 
                Orientation="Vertical" 
                VerticalAlignment="Center" HorizontalAlignment="Center" >
                <TextBlock 
                    Text="Избранное" 
                    VerticalAlignment="Center" Foreground="DarkBlue" FontWeight="Bold" Height="Auto" FontSize="16">
                </TextBlock>
                <Button Name="oBtnClearAll" Click="oBtnClearAll_Click">Очистить все</Button>
            </StackPanel>
        </Grid>

    </Grid>

</navigation:Page>
